# This is the makefile that generates the executable

CFLAGS = -Wall -Werror -DNDEBUG
LFLAGS = -lm

FILES_C = main.c rpn_stack.c eval_expr.c variables.c functions.c

TARGET = eval_expr

# There is no need to change the instructions below this
# line

FILES_O = $(subst .c,.o,$(FILES_C))

$(TARGET): $(FILES_O) headers.h Makefile
	gcc $(FILES_O) -o $(TARGET) $(LFLAGS) 

%.o: %.c Makefile 
	gcc $(CFLAGS) -c $<

all: $(TARGET) 

clean:
	/bin/rm $(FILES_O) $(TARGET)
